package io.github.iogogogo.service;

import io.github.iogogogo.annotation.DataSource;
import io.github.iogogogo.mapper.AlertMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * Created by tao.zeng on 2024/11/7.
 */
@Service
public class AlertService {

    @Resource
    private AlertMapper alertMapper;

    @DataSource("master")
    public long master() {
        return alertMapper.count();
    }

    @DataSource("salve")
    public long salve() {
        return alertMapper.count();
    }
}
